package com.action;

import com.bean.User;
import com.biz.UserBiz;
import com.biz.impl.UserBizImpl;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class RegisterAction extends ActionSupport implements ModelDriven<User> {
	private User user;

	@Override
	public String execute() {
		UserBiz userBiz = new UserBizImpl();
		userBiz.add(user);
		return SUCCESS;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public User getModel() {
		user = new User();
		return user;
	}

}
